<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="${initParam.root}/jquery-1.8.3.js"></script>
<script type="text/javascript"
	src="${initParam.root}/scripts/templates/top_logo.js"></script>
<style>
	.href_style{
		text-decoration:none;
		color: #808080;
	}
	a.href_style:hover{
		text-decoration:underline;
		color: #f36523
	}
</style>
<form action="${initParam.root }/member.do" id="loginForm_logo"
	method="post" name="loginForm">
	<input type="hidden" name="command" value="login"> <span
		class="logo"> <a
		href="${initParam.root }/recipe.do?command=getTodayCook&today=today"><img
			src="${initParam.root }/img/top/top-02-img.gif" alt="홈버튼" class="img"
			id="logo1" /></a>
	</span> <span id="login"> 
	<!-- m_type이 'b' 일경우 일반회원
		 mvoLogin==null 일 경우는 로그인 되지 않은 초기화면
		 otherwise 관리자일 경우 
		 위의 3가지로 구분한다.
	  -->
		<c:choose>

			<c:when test="${sessionScope.loginMember.mvoLogin.m_type=='b' }">
					 <span style="font-size: 11px;"><a href="member.do?command=userInfo" class="href_style"> ${sessionScope.loginMember.mvoLogin.m_name }님</a> 환영합니다.</span>
				<input type="button" value="로그아웃" id="logout" class="button_img" style="height: 20px; width: 60px;  font-size: 9px; margin: 5px;">
				<span style="font-size: 11px;"><a href=member.do?command=userInfo class="href_style">내정보</a></span>
			</c:when>

			<c:when test="${sessionScope.loginMember.mvoLogin==null }">
					<input type="text" id="m_id" value="ID" name="m_id" class="text"title="아이디" style="ime-mode: inactive;" size="10px" onfocus="this.value='';">
			<input type="password" id="m_password" name="m_password" value=""	class="text" title="비밀번호" size="10px">
			<input type="image" src="${initParam.root }/img/top/top-05-img.gif"	alt="로그인" class="img" id="loginBtn">
			<a href="${initParam.root }/member.do?command=registerPage"><img src="${initParam.root }/img/top/top-07-img.gif" alt="회원가입"	class="img" /></a>
			</c:when>
			<c:otherwise>

				<span style="font-size: 11px;"><a href="member.do?command=adminInfo" class="href_style"> ${sessionScope.loginMember.mvoLogin.m_name }(관리자님) </a></span>
				<input type="button" value="로그아웃" id="logout" class="button_img" style="height: 20px; width: 60px;  font-size: 9px; margin: 5px; ">
				<span style="font-size: 11px;"><a href=member.do?command=findAllMemberInfo class="href_style">전체회원보기</a></span>
			</c:otherwise>
		</c:choose>
	</span>
</form>